import request from "@/utils/request";
// import Qs from "qs";

export function LEDUploadFile(query) {
  return request({
    url: "http://127.0.0.1:8088/Led/uploadfile",
    method: "post",
    data: query,
    headers: { "Content-Type": "multipart/form-data" },
  });
}

export function uploadPrograms(query) {
  return request({
    url: "http://127.0.0.1:8088/Led/uploadPrograms",
    method: "post",
    data: query,
    // headers: { "content-Type": " application/json" },
  });
}
// 节目列表
export function getPrograList(query) {
  return request({
    url: "http://127.0.0.1:8088/Led/getPrograList",
    method: "get",
    params: query,
  });
}
// 设备列表
export function getLedScreeList(query) {
  return request({
    url: "http://127.0.0.1:8088/Led/getLedScreeList",
    method: "get",
    params: query,
  });
}

// 设备列表2
// export function getLedScreeList(query) {
//   return request({
//     url: "/admin/device.Ledscree/index",
//     method: "get",
//     params: query,
//   });
// }
// 新增设备
export function addScreeLed(query) {
  return request({
    url: "http://127.0.0.1:8088/Led/addScree",
    method: "get",
    params: query,
  });
}
// 编辑设备
export function updateScree(query) {
  return request({
    url: "http://127.0.0.1:8088/Led/updateScree",
    method: "post",
    data: query,
  });
}
// 打开设备
export function takeBxON(query) {
  return request({
    url: "http://127.0.0.1:8088/Led/takeBxON",
    method: "post",
    data: query,
  });
}
// 关闭设备
export function takeBxOff(query) {
  return request({
    url: "http://127.0.0.1:8088/Led/takeBxOff",
    method: "post",
    data: query,
  });
}

// 删除节目
export function delPrograms(query) {
  return request({
    url: "http://127.0.0.1:8088/Led/delPrograms",
    method: "get",
    params: query,
  });
}
// 发布节目
export function sendPrograms(query) {
  return request({
    url: "http://127.0.0.1:8088/Led/sendPrograms",
    method: "post",
    data: query,
  });
}

// 新增LED屏幕
export function addScree(query) {
  return request({
    url: "http://127.0.0.1:8088/Led/addScree",
    method: "get",
    params: query,
  });
}
// 删除LED屏幕
export function delScree(query) {
  return request({
    url: "http://127.0.0.1:8088/Led/delScree",
    method: "get",
    params: query,
  });
}

//合闸
export function KongZhKai(query) {
  return request({
    url: "http://127.0.0.1:8088/kongzhi/kai",
    method: "post",
    data: query,
  });
}

//关闸
export function KongZhiGuan(query) {
  return request({
    url: "http://127.0.0.1:8088/kongzhi/guan",
    method: "post",
    data: query,
  });
}

//照明列表
export function DeviceLampLigt(query) {
  return request({
    url: "/admin/device.Lampligt/index",
    method: "get",
    params: query,
  });
}

// 获取所有灯杆列表，搜索用
export function LampallList(query) {
  return request({
    url: "/admin/device.Lamp/allList",
    method: "get",
    params: query,
  });
}

// 新增照明设备
export function AddDeviceLamp(query) {
  return request({
    url: "/admin/device.Lampligt/add",
    method: "post",
    data: query,
  });
}

//编辑照明设备
export function EditDeviceLamp(query) {
  return request({
    url: "/admin/device.Lampligt/edit",
    method: "post",
    data: query,
  });
}

// 删除照明设备
export function DeleteDeviceLamplight(query) {
  return request({
    url: "/admin/device.Lampligt/delete",
    method: "post",
    data: query,
  });
}
